<!DOCTYPE html>
<html><head>
	<title>测试歪酷</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<!-- Mobile Devices Support @begin -->
	<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
	<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
	<meta content="no-cache" http-equiv="pragma">
	<meta content="0" http-equiv="expires">
	<meta content="telephone=no, address=no" name="format-detection">
	<meta content="width=device-width, initial-scale=1.0" name="viewport">
	<meta name="apple-mobile-web-app-capable" content="yes"> <!-- apple devices fullscreen -->
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
	<!-- Mobile Devices Support @end -->
	<meta name="keywords" content="微擎,微信,微信公众平台">
	<meta name="description" content="微信公众平台自助引擎，简称微擎，微擎是一款免费开源的微信公众平台管理系统。">
	
	<link type="text/css" rel="stylesheet" href="./source/modules/ggl/template/css/bootstrap.css">
	<link type="text/css" rel="stylesheet" href="./source/modules/ggl/template/css/font-awesome.css">
	<link type="text/css" rel="stylesheet" href="./source/modules/ggl/template/css/common.css">
	
	<link href="./source/modules/ggl/template/style/jquery.css"  rel="stylesheet" type="text/css">
    <link href="./source/modules/ggl/template/style/activityggk.css"  rel="stylesheet" type="text/css">
	
	<script type="text/javascript" src="./source/modules/ggl/template/js/jquery-1.js"></script>
	<script type="text/javascript" src="./source/modules/ggl/template/js/bootstrap.js"></script>
	<script type="text/javascript" src="./source/modules/ggl/template/js/cascade.js"></script>
	<script type="text/javascript" src="./source/modules/ggl/template/js/swipe.js"></script>

	<!--[if IE 7]>
	<link rel="stylesheet" href="./resource/style/font-awesome-ie7.min.css">
	<![endif]-->
</head>
<body>
<script type="text/javascript">
var i=15;
var j=2;
var url="{php echo create_url('index/module', array('do' => 'getstatu', 'name' => 'yyy', 'id' => $id))}";
</script>

<script>
//倒计时
    function _ajax(url){
            $.ajax({
    			type: 'POST',
    			url: url,
				async: false,
    			type: 'POST',
    			cache: false,
    			error: function(xhr,ts,et){alert('异步返回有误,错误码'+ts);return false;}, 
    			success:function(data){
    			    dat=data;
    			} 
    		});
    }

    function showList(){
	    var action=setTimeout("showList()",3000);
		var uri="{php echo create_url('index/module', array('do' => 'Awardlist', 'name' => 'yyy', 'id' => $id, 'runstatus' => 'ks'))}";
		_ajax(uri);
		var ht='';
		$(eval(dat)).each(function(n,value){
			if((n+1)==1){
			    var img = '<img src="./source/modules/ggl/template/images/1.jpg" >';
			}else if((n+1)==2){
			    var img = '<img src="./source/modules/ggl/template/images/2.jpg" >';
			}else if((n+1)==3){
			    var img = '<img src="./source/modules/ggl/template/images/3.jpg" >';
			}else{
			    var img =n+1;
			}
		  ht+='<div class="progress progress-striped active"><div class="img">'+img+'</div><div class="name">'+this.nickname+'</div><div class=".progress-bar" style="width:650px;height:25px;float:left"><div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="1" aria-valuemin="0" aria-valuemax="100" style="width:'+this.playnum+'%"></div></div></div>';
        }); 
		$(".shake-list").html(ht);	
	}
	
	function lxfEndtime(){
	    _ajax(url)
		var action=setTimeout("lxfEndtime()",1000);
		switch (dat)
        {
        case 'djsks':
			$(".num").text(i--);
			if(i==-1){
		    $(".num").text('开始疯狂的摇吧！！');
			var uri="{php echo create_url('index/module', array('do' => 'Runstatus', 'name' => 'yyy', 'id' => $id, 'runstatus' => 'ks'))}";
			_ajax(uri);
			clearTimeout(action);
			$(".shake-top,.shake-bottom").slideUp();
			$(".shake-list").slideDown();
			showList();
		    }  
            break;
		case 'ks':
		    $(".shake-top,.shake-bottom").slideUp();
			$(".shake-list").slideDown();
			showList()
			clearTimeout(action);
		break;
		case 'fin':
		    $(".shake-top,.shake-bottom").slideUp();
			$(".shake-list").slideDown();
			showList()
			clearTimeout(action);
		break;
        default:
          
        }
    };

	function begin(){
	    var keytime=setTimeout("begin()",500);
		if((j%2)==0){
		    $(".num").css("color","red");;
		}else{
		    $(".num").css('color','#fff');
		}
		j++;
		if(j==8){
		clearTimeout(keytime);
	         var uri="{php echo create_url('index/module', array('do' => 'Runstatus', 'name' => 'yyy', 'id' => $id, 'runstatus' => 'djsks'))}";
		    _ajax(uri);
		}
	}
	$(document).keypress(function(e){	     
        begin()   
	});
	
	$(function(){
        lxfEndtime();
    });
	
	
</script>
<style>
body{background:url('./source/modules/ggl/template/images/bg.jpg') no-repeat center;}
.shake-main{padding:15px 10px;width:900px; margin:auto auto;}
.shake-top,.shake-bottom{ text-align:center; font-size:150px; color:#fff}
.shake-top,.shake-bottom{ }
.shake-list{display:none;}

.shake-list{padding:5px 0px 5px 0px;}
.progress{background:#fe9900;height:35px;}
.progress-bar {
	margin: 5px 0;
	float: left;
	width: 0;
	height: 25px;
	font-size: 12px;
	line-height: 20px;
	color: #ffffff;
	text-align: center;
	background-color: #428bca;
	-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
	box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
	-webkit-transition: width 0.6s ease;
	transition: width 0.6s ease;
}
.img{float:left;margin:0px 5px 0px 5px;width: 56px; text-align:center;}
.name{ 
	padding: 0px 5px 0px 5px;
	margin: 5px;
	height: 25px;
	width: 150px;
	float: left;
}
</style>
<div style="height: 718px;" class="shake-main">
	<div class='shake-header'>
	     <img src="./source/modules/ggl/template/images/header.jpg" width="100%" >
	</div>
	<div class="shake-top">
	    <span class="num">开始</span>
	</div>
	<div class="shake-bottom">
	    <img src="./source/modules/ggl/template/images/tj.jpg" >
	</div>
	<div class="shake-list">

	</div>
	
	
	
	
	
	
	
	
	
</div>

</body></html>